form(editable-form='', name='versionForm', onaftersave='acceptEdit()', e-role='form')
  .modal-header
    h3.modal-title {{ version.name }}
  .modal-body
    .form-horizontal
      // Version Name
      .form-group
        label.col-md-4.control-label Version Name
        .col-md-7 {{ version.name }}
      // Select Channel
      .form-group
        label.col-md-4.control-label Channel
        .col-md-7 {{ version.channel.name || 'Not set' }}
      // Notes
      .form-group
        label.col-md-4.control-label(for='notes') Change Notes
        .col-md-7
          span(
            editable-textarea='version.notes',
            e-name='notes',
            e-rows='3',
            e-cols='60'
            )
            p.release-notes {{ version.notes || 'Not set' }}
      
      h4 Assets
      table.table.table-bordered.table-hover.table-condensed.table-custom(ng-cloak)
        thead
          tr
            td Name
            td Platform
            td Downloads
            td
        tbody
          tr(data-ng-repeat='asset in version.assets')
            td {{ asset.name }}
            td {{ DataService.availablePlatforms[asset.platform] }}
            td {{ asset.download_count }}
            td(style="white-space: nowrap")
              button.btn.btn-default.btn-sm(type='button', ng-click="openEditAssetModal(asset)")
                | More
      button.btn.btn-success(type='button', ng-click='openAddAssetModal()') Add Asset
      
      div.text-left
        h4 Required Assets
        h5
          strong Windows
        p
          |  New installs require 
          code .exe
          |  or 
          code .msi
          |  assets. Updates require 
          code .nupkg
          | .
        h5
          strong OSX
        p
          |  New installs require 
          code .dmg
          |  assets. Updates require 
          code .zip
          | .
        h5
          strong Linux
        p
          |  New installs require
          code .deb
          |  , 
          code .rpm
          |  , 
          code .tar.gz
          |  or 
          code .AppImage
          |  assets. Updates are not supported.
  .modal-footer
    div(ng-if='!versionForm.$visible')
      button.btn.btn-warning(type='button', ng-click='versionForm.$show()') Edit
      button.btn.btn-danger(type='button', ng-click='deleteVersion()', confirm='Are you sure that you want to delete this version?') Delete
      button.btn.btn-default(type='button', ng-click='closeModal()') Close
    div(ng-if='versionForm.$visible')
      button.btn.btn-warning(type='submit', ng-disable='versionForm.$waiting') Accept Changes
      button.btn.btn-danger(type='button', ng-click='versionForm.$cancel()') Cancel
